<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <f:metadata>
            <f:viewParam name="u" value="#{usersController.user}" />
        </f:metadata>
        <ui:define name="title">
            <h:outputText value="Personal Information"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditUsersLabel_username}" for="username" />                    
                    <h:outputText id="username" value="#{usersController.selected.username}" title="#{bundle.EditUsersTitle_username}"/>
                    
                    <h:outputLabel value="#{bundle.EditUsersLabel_name}" for="name" />
                    <h:inputText id="name" value="#{usersController.selected.name}" title="#{bundle.EditUsersTitle_name}" />
                    <h:outputLabel value="#{bundle.EditUsersLabel_address}" for="address" />
                    <h:inputText id="address" value="#{usersController.selected.address}" title="#{bundle.EditUsersTitle_address}" />
                    <h:outputLabel value="#{bundle.EditUsersLabel_phoneNum}" for="phoneNum" />
                    <h:inputText id="phoneNum" value="#{usersController.selected.phoneNum}" title="#{bundle.EditUsersTitle_phoneNum}" />
                    <h:outputLabel value="#{bundle.EditUsersLabel_drivingLicenseNum}" for="drivingLicenseNum" />
                    <h:inputText id="drivingLicenseNum" value="#{usersController.selected.drivingLicenseNum}" title="#{bundle.EditUsersTitle_drivingLicenseNum}" />
                </h:panelGrid>
                <h:commandLink action="#{usersController.updateUser}" value="#{bundle.EditUsersSaveLink}"/>
 
            </h:form>
        </ui:define>
    </ui:composition>

</html>
